package com.loklok.code.confuse.dto;

import com.intellij.openapi.fileTypes.FileType;

import java.io.Serializable;

public class GenerateCodeDto implements Serializable {

    private String fullPck;

    private String className;

    private String generateCode;

    private FileType fileType;

    private boolean createFile;

    public static GenerateCodeDto buildCreateFile(String fullPck, String className, String generateCode, FileType fileType) {
        GenerateCodeDto generateCodeDto = new GenerateCodeDto();
        generateCodeDto.setFullPck(fullPck);
        generateCodeDto.setClassName(className);
        generateCodeDto.setGenerateCode(generateCode);
        generateCodeDto.setFileType(fileType);
        generateCodeDto.setCreateFile(true);
        return generateCodeDto;
    }

    public static GenerateCodeDto buildWriteMethod(String generateCode) {
        GenerateCodeDto generateCodeDto = new GenerateCodeDto();
        generateCodeDto.setGenerateCode(generateCode);
        generateCodeDto.setCreateFile(false);
        return generateCodeDto;
    }


    public String getFullPck() {
        return fullPck;
    }

    public void setFullPck(String fullPck) {
        this.fullPck = fullPck;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getGenerateCode() {
        return generateCode;
    }

    public void setGenerateCode(String generateCode) {
        this.generateCode = generateCode;
    }

    public FileType getFileType() {
        return fileType;
    }

    public void setFileType(FileType fileType) {
        this.fileType = fileType;
    }

    public boolean isCreateFile() {
        return createFile;
    }

    public void setCreateFile(boolean createFile) {
        this.createFile = createFile;
    }
}
